package com.zhoug.router3demo;

import android.content.Context;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.zhoug.logger3.Logger;

/**
 * @Author: zhoug
 * @Date: 2025-01-21
 * @Description:
 */
@Route(path = Paths.FirmUserServer,priority = 300)
public class FirmUserServer implements IUserServer {
    private static final String TAG = ">>>FirmUserServer";
    private User user;

    @Override
    public User getUser() {
        return user;
    }

    @Override
    public boolean isAdmin() {
        User user = getUser();
        return user != null && user.isAdmin();
    }

    @Override
    public void init(Context context) {
        Logger.d(TAG, "init user:");
        user = new User();
        user.setName("企业用户");
        user.setPwd("123");
        user.setAdmin(false);
        user.setSex("男");
    }
}
